home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
dev
/
m2
/
ModGen.lha
/
ModGen
/
Source
/
NoFragLib.def
< prev
next >
Wrap
Text File
|
1995-04-20
|
3KB
|
91 lines
(* (*----------------------------------------------------------------------
:Program. NoFragLib
:Contents. Interface to Jan van den Baard's Library
:Author. Kai Bolay [kai]
:Address. Snail-Mail: E-Mail:
:Address. Hoffmannstraße 168 UUCP: kai@amokle.stgt.sub.org
:Address. D-7250 Leonberg 1 FIDO: 2:2407/106.3
:History. v1.0 [kai] 15-Feb-91 (translated from C)
:History. v1.0 [kai] 13-Feb-93 (recompiled + bug-fixes)
:History. v1.0m [Frank Lömker] 13-Feb-93 (Umsetzung nach Modula)
:History. v1.0t [Frank Lömker] 17-Apr-95 (Umsetzung nach Turbo Modula)
:Copyright. FD
:Language. Modula-2
:Translator. Turbo Modula-2 V1.40
----------------------------------------------------------------------*) *)
DEFINITION FOR LIBRARY MODULE NoFragLib;
FROM SYSTEM IMPORT ADDRESS,LONGSET;
FROM Exec IMPORT Library;
CONST
noFragVersion = 2;
noFragRevision = 2;
noFragName = "nofrag.library";
TYPE
noFragBasePtr = POINTER TO noFragBase;
noFragBase = RECORD
libNode: Library;
END;
(*
* ALL structures following are PRIVATE! DO NOT USE THEM!
*)
MemoryBlockPtr = POINTER TO MemoryBlock;
MemoryBlock = RECORD
next, previous: MemoryBlockPtr;
requirements: LONGSET;
bytesUsed: LONGINT;
END;
MemoryItemPtr = POINTER TO MemoryItem;
MemoryItem = RECORD
next, previous: MemoryItemPtr;
block: MemoryBlockPtr;
size: LONGINT;
END;
BlockListPtr = POINTER TO BlockList;
BlockList = RECORD
first, end, last: MemoryBlockPtr;
END;
ItemListPtr = POINTER TO ItemList;
ItemList = RECORD
first, end, last: MemoryItemPtr;
END;
(*
* This structure may only be used to pass on to the library routines!
* It may ONLY be obtained by a call to "GetMemoryChain()"
*)
MemoryChainPtr = POINTER TO MemoryChain;
MemoryChain = RECORD
block: BlockList;
items: ItemList;
blockSize: LONGINT;
END;
CONST MinAlloc = SIZE (MemoryItem);
VAR NoFragBase:noFragBasePtr;
PROCEDURE GetMemoryChain (blocksize: LONGINT): MemoryChainPtr;
PROCEDURE AllocItem (chain: MemoryChainPtr; size: LONGINT;
requirements: LONGSET): ADDRESS;
PROCEDURE FreeItem (chain: MemoryChainPtr; memptr: ADDRESS; size: LONGINT);
PROCEDURE FreeMemoryChain (chain: MemoryChainPtr; all: BOOLEAN);
PROCEDURE AllocVecItem (chain: MemoryChainPtr; size: LONGINT;
requirements: LONGSET): ADDRESS;
PROCEDURE FreeVecItem (chain: MemoryChainPtr; memptr: ADDRESS);
END NoFragLib.